package com.code.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.code.entity.Templates;
import com.code.mapper.TemplatesMapper;
import com.code.mapper.UserMapper;
import com.code.service.ITemplatesService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 合同模版表 服务实现类
 * </p>
 *
 * @author guanfenga@yonyou.com
 * @since 2022-09-15
 */
@Service
public class TemplatesServiceImpl extends ServiceImpl<TemplatesMapper, Templates> implements ITemplatesService {

    @Autowired
    private TemplatesMapper templatesMapper;

    @Override
    public List<Templates> queryTemplatesList(Templates templates) {
        LambdaQueryWrapper<Templates> wrapper = new QueryWrapper<Templates>().lambda();
        return templatesMapper.selectList(wrapper);
    }

    @Override
    public List<Templates> findTemplatesPage(Integer pageBefore, Integer limit, Templates templates) {
        return templatesMapper.findTemplatesPage(pageBefore,limit,templates);
    }
}
